﻿KISSY.add("fgt/sns/sina", function (S) {
    function Sina(config) {
        this._init(config || {});
    }

    S.augment(Sina, {
        _init: function (config) {
            var self = this;

            self.cnName = "新浪微博";
            self.spanClass = "weibo";
            self.aClass = "weiboaclass";
        },

        generateLink: function (snsModel) {
            var self = this,
                encode = encodeURIComponent;

            self.link = "http://service.weibo.com/share/share.php?appkey=1509587317&url=" + encode(snsModel.link) + "&title=" + encode(snsModel.title) + "&source=&content=utf-8";
            if (snsModel.pic) {
                self.link += "&pic=" + encode(snsModel.pic);
            }

            return self.link;
        }
    });

    return Sina;
});